<?php
namespace WeChat;
use Swiftx\Base\Object;

/**
 * ---------------------------------------------------------------------------------------------------------------------
 * 微信用户
 * ---------------------------------------------------------------------------------------------------------------------
 * @author		胡永强  <odaytudio@gmail.com>
 * @since		2015-12-15
 * @copyright	Copyright (c) 2014-2015 Swiftx Inc.
 * ---------------------------------------------------------------------------------------------------------------------
 * @property-read string $OpenID        用户的唯一标识
 * @property-read string $NickName      用户昵称
 * @property-read bool|null $Sex        用户的性别，值为true时是男性，值为false时是女性，值为null时是未知
 * @property-read string $Language      用户所使用的语言
 * @property-read string $City          用户个人资料填写的省份
 * @property-read string $Province      普通用户个人资料填写的城市
 * @property-read string $Country       国家，如中国为CN
 * @property-read string $HeadImgUrl    用户头像，最后一个数值代表正方形头像大小（有0、46、64、96、132数值可选，0代表640*640正方形头像），用户没有头像时该项为空
 * @property-read array $Privilege      用户特权信息，json 数组，如微信沃卡用户为（chinaunicom）
 * ---------------------------------------------------------------------------------------------------------------------
 */
class User extends Object {

    protected $_open_id;
    protected $_nickname;
    protected $_sex;
    protected $_language;
    protected $_city;
    protected $_province;
    protected $_country;
    protected $_head_img_url;
    protected $_privilege;


    /**
     * 构造微信用户
     * @param string $OpenID
     * @param string $NickName
     * @param bool $Sex
     * @param string $Language
     * @param string $City
     * @param string $Province
     * @param string $Country
     * @param string $HeadImgUrl
     * @param array $Privilege
     */
    public function __construct($OpenID, $NickName ,$Sex, $Language, $City, $Province, $Country, $HeadImgUrl,array $Privilege){
        $this->_open_id = $OpenID;
        $this->_nickname = $NickName;
        $this->_sex = $Sex;
        $this->_language = $Language;
        $this->_city = $City;
        $this->_province = $Province;
        $this->_country = $Country;
        $this->_head_img_url = $HeadImgUrl;
        $this->_privilege = $Privilege;
    }

}
